<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单管理-车速递</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../css/mymain.mymain.css">
    <script type="application/javascript" src="../js/jquery-3.3.1.js"></script>
    <script type="application/javascript" src="../js/bootstrap.min.js"></script>
    <script type="application/javascript" src="../layui/layui.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>

</head>
<body style="position: static">

<div id="app" class="bgGray">
    <div data-v-95ac8d30="" class="header3">
        <div data-v-95ac8d30="" class="layout clear">
            <div data-v-95ac8d30="" class="left logo">
                <a data-v-95ac8d30="" href="index.html">
                    <img data-v-95ac8d30="" src="">
                </a>
            </div> <div data-v-95ac8d30="" class="header3Nav right">|<a data-v-95ac8d30="" href="orderManage.html">我的订单</a>|<a data-v-95ac8d30="" href="helpCenter.html">帮助中心</a>|<a data-v-95ac8d30="" href="javascript:void">退出</a>
        </div>
            <div data-v-95ac8d30="" class="header3User right">
                <i data-v-95ac8d30="" class="iconfont icon-phone"></i>
                <span data-v-95ac8d30="" class="sp1">400-919-8000</span>
                <span data-v-95ac8d30="" class="sp2">欢迎您，</span>
                <span data-v-95ac8d30="" class="sp3"></span>
            </div>
        </div>
    </div>
    <div class="userInfo">
        <div class="layout">
            <div class="userInfoCom clear">
                <div class="userInfoL left">
                    <div data-v-1cae2c34="" class="userNav">
                        <dl data-v-1cae2c34="" class="userMsg">
                            <dt data-v-1cae2c34="">
                                <img data-v-1cae2c34="" src="">
                            </dt>
                            <dd data-v-1cae2c34="">
                                <p data-v-1cae2c34=""></p>
                                <p data-v-1cae2c34="" class="p5 pp" style="">普卡会员</p>
                            </dd>
                        </dl>
                        <ul data-v-1cae2c34="" class="manNav">
                            <li data-v-1cae2c34="">
                                <a data-v-1cae2c34="" href="mymain.html" class="">订单管理</a>
                            </li>
                            <li data-v-1cae2c34="">
                                <a data-v-1cae2c34="" href="myinfo.html" class="sel">个人信息</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="userInfoR right">

                    <div class="orderManage manage">
                        <div class="orderManageTit manageTit clear">
                            <div class="left tit">个人信息</div>
                        </div>
                        <div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
                            <div class="orderList list" id="noda">
                                <table  class="tableinfo" >
                                    <tr>
                                        <td>手机号：<input type="text" v-model="tel"  /></td>
                                    </tr>
                                    <tr>
                                        <td>邮箱： <input type="email" v-model="email"  /></td>
                                    </tr>

                                    <tr>
                                        <td>密码： <input type="text" v-model="password"  /></td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <button id="modifyInfo" onclick="modifyInfo()" style="color: orangered">修改信息</button>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                            <button id="modifyPassword" onclick="modifyPassword()" style="color: orangered">修改密码</button>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div data-v-3aaf9db2="" class="footer2">
        <div data-v-3aaf9db2="" class="layout clear">
            <div data-v-3aaf9db2="" class="d1">
                <a data-v-3aaf9db2="" href="about.html">关于车速递</a></div></div></div>

</div>

<script type="text/javascript">


    var vm = new Vue({
        el:'#noda',
        data:{
            tel:'',
            email:'',
            password:''
        },
    });


    $(function () {
        $.ajax({
            type:"get",
            url:"/carCourier/query.do",
            dataType:"json",
            success:function(data){
                if(data.code==1){
                    $(".sp3").html(data.info.tel);
                    vm.tel = data.info.tel;
                    vm.email=data.info.email;
                    vm.password=data.info.password;
                }
            }
        })
    })

    function modifyInfo (){
        $.ajax({
            type:"post",
            url:"/carCourier/user/update.do",
            dataType:"json",
            data: {"tel":vm.tel,"email":vm.email},
            success:function(data){
                if(data.code==1){
                    alert("信息更新成功!")
                }
            }
        })
    }

    function modifyPassword (){
        $.ajax({
            type:"post",
            url:"/carCourier/user/modifypassword.do",
            dataType:"json",
            data: {"password":vm.password},
            success:function(data){
                if(data.code==1){
                    alert("密码更新成功!")
                }
            }
        })
    }


</script>

</body>
</html>